{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b3108e3d-dc5b-4f4f-8bd5-88c71e422b38",
   "metadata": {},
   "source": [
    "# Scatter Matrix Plot\n",
    "\n",
    "A scatter matrix (pair plot) showing pairwise relationships between multiple numeric variables. This example uses the `penguins` dataset to explore correlations and group separation by species."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "eb7fa534-d6ef-4465-a215-4ea13b5b20f2",
   "metadata": {},
   "outputs": [],
   "source": [
    "import hvplot.pandas  # noqa\n",
    "\n",
    "df = hvplot.sampledata.penguins('pandas')\n",
    "\n",
    "cols = ['bill_length_mm', 'bill_depth_mm', 'flipper_length_mm', 'body_mass_g', 'species']\n",
    "df = df[cols]\n",
    "\n",
    "hvplot.plotting.scatter_matrix(\n",
    "    df,\n",
    "    c='species',\n",
    "    alpha=0.6,\n",
    "    cmap='Category10',\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "22add9a1-1460-4cca-bfdb-7082d17112a3",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Scatter Matrix reference documentation](../../ref/api/manual/hvplot.plotting.scatter_matrix.ipynb).\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
